package cn.wolfcode.trip.base.domain;

import lombok.Getter;
import lombok.Setter;

@Getter@Setter
public class User extends BaseDomain{
    public final static Integer GENDER_MAN=1;
    public final static Integer GENDER_WOMEN=0;
    public final static Integer GENDER_SECURITY=-1;


    private String email;//邮箱

    private String nickName;//昵称

    private String password;//密码

    private String place;//地区

    private String headImgUrl;//头像

    private Integer gender=GENDER_SECURITY;//性别

    private String coverImgUrl;//封面

    private String sign;//签名

    public String getGenderName(){
       String temp="保密";
       if(gender==GENDER_MAN){
           temp="男";
       }else if(gender==GENDER_WOMEN){
           temp="女";
       }
       return temp;
    }
}
/*总结:
*   在做保存时,这里的genderName容易报空指针异常:
*           1.静态常量没有用Integer包装类型,当我们用gender和静态常量比较时,
*   */